Printing apparatus and printing method

ABSTRACT

A printing apparatus measures spectral intensity of a printed medium before an image is printed thereon, and calculates Mahalanobis distances with respect to plural types of reference printing media stored in advance. Then, the type of the printed medium is determined from the reference printing media based on the Mahalanobis distances and the image is printed thereon.

BACKGROUND

1. Technical Field

The present invention relates to a printing apparatus and a printingmethod of printing an image on a printing medium.

2. Related Art

Printing apparatuses of printing images by attaching color materialssuch as inks to surfaces of printing media (for example, printing paperor the like) have been developed and widely used. Further, with thewidespread of the printing apparatuses, various types of paper asprinting media have been provided. As a result, in the recent printingapparatuses, images can be printed with more preferable image quality byimage processing according to the types of printing media.

Here, the types of printing media are typically set for the printingapparatuses before the start of printing by operators of the printingapparatuses, however, technologies that enable the printing apparatusesto automatically discriminate the types of printing media have beendeveloped. For example, in a paper type discrimination device disclosedin JP-A-2006-58261, a technology that enables discrimination of thetypes of printing media (here, printing paper) by applying light tosurfaces of the printing media and detecting intensity of the lighttransmitted through the printing media or intensity of the lightreflected on the surfaces of the printing media has been proposed.

Alternatively, in a printing apparatus disclosed in JP-A-2011-93183, atechnology for simply discriminating the types of printing media bydetecting drive torque of a paper feed motor that feeds the printingmedia has been also proposed.

However, with the increasing types of printing media, it has beendifficult to discriminate the types of printing media with sufficientaccuracy using the above proposed technologies, and a problem ofdifficulty in appropriate image printing has arisen.

SUMMARY

An advantage of some aspects of the invention is to provide a technologythat enables appropriate image printing by discriminating types ofprinting media with sufficient accuracy.

A printing apparatus according to an aspect of the invention includes animage processing memory unit that stores image processing to beperformed on image data in response to predetermined plural types ofreference printing media, a spectral intensity measurement unit thatmeasures spectral intensity as light intensity at predetermined pluraltypes of measurement wavelengths by applying light to a printed mediumbefore an image is printed thereon, an average spectral intensity memoryunit that stores average spectral intensity obtained by measuring thespectral intensity at plural times and obtaining average values of thespectral intensity with respect to each measurement wavelength withrespect to the plural types of reference printing media, a covarianceinformation memory unit that stores covariance information obtained bymeasuring the spectral intensity at plural times and obtainingcovariances of the spectral intensity among the plural measurementwavelengths with respect to the plural types of reference printingmedia, a Mahalanobis distance acquisition unit that acquires Mahalanobisdistances between the printed medium and the plural types of referenceprinting media based on the spectral intensity, the average spectralintensity, and the covariance information, a medium type determinationunit that determines a type of the printed medium from the pluralreference printing media based on the Mahalanobis distances, and animage printing unit that performs the image processing stored inresponse to the determined reference printing medium on the image dataand prints the image on the printed medium.

Further, a printing method according to an aspect of the inventioncorresponding to the above-described printing apparatus includes animage processing memory step of storing image processing to be performedon image data in response to predetermined plural types of referenceprinting media, a spectral intensity measurement step of measuringspectral intensity as light intensity at predetermined plural types ofmeasurement wavelengths by applying light to a printed medium before animage is printed thereon, an average spectral intensity memory step ofstoring average spectral intensity obtained by measuring the spectralintensity at plural times and obtaining average values of the spectralintensity with respect to each measurement wavelength with respect tothe plural types of reference printing media, a covariance informationmemory step of storing covariance information obtained by measuring thespectral intensity at plural times and obtaining covariances of thespectral intensity among the plural measurement wavelengths with respectto the plural types of reference printing media, a Mahalanobis distanceacquisition step of acquiring Mahalanobis distances between the printedmedium and the plural types of reference printing media based on thespectral intensity, the average spectral intensity, and the covarianceinformation, a medium type determination step of determining a type ofthe printed medium from the plural reference printing media based on theMahalanobis distances, and an image printing step of performing theimage processing stored in response to the determined reference printingmedium on the image data and printing the image on the printed medium.

In the printing apparatus and the printing method according to theaspects of the invention, the average spectral intensity and thecovariance information are stored in advance with respect to the pluraltypes of reference printing media. Here, the average spectral intensityis averaged spectral intensity obtained by measuring the spectralintensity as light intensity at the plural measurement wavelengths atplural times and averaging the light intensity of the spectral intensityat the respective measurement wavelengths with respect to eachmeasurement wavelength. The spectral intensity with respect to thereference printing medium may be obtained by applying light to thereference printing medium and measuring the light intensity at theplural measurement wavelengths. The light intensity measured here may beintensity of reflected light from the reference printing medium orintensity of the light transmitted through the reference printingmedium. Note that it is not necessary to use the value of the measuredlight intensity as it is and, for example, the measured light intensitymay be converted into a value indicating a ratio to intensity of theapplied light and used in place of the light intensity.

The covariance information is information obtained by measuring thespectral intensity at plural times and obtaining the covariance of thelight intensity among plural measurement wavelengths. Furthermore, imageprocessing to be performed on the image data is stored in advance inresponse to the plural types of reference printing media. Then, when animage is printed, light is applied to the printed medium before theimage is printed thereon and the spectral intensity of the printedmedium is measured, and then, the Mahalanobis distances between theprinted medium and the respective reference printing media are acquiredbased on the average spectral intensity and the covariance informationstored in advance. Then, the type of the printed medium is determinedfrom those reference printing media based on the Mahalanobis distancesobtained between the respective reference printing media and itself.Then, the image processing stored in response to the determinedreference printing medium is performed on the image data, and thereby,the image is printed on the printed medium.

The spectral intensity measured with respect to the printed medium hasnot only information on light intensity at the individual measurementwavelengths but also various information on relations among lightintensity at the plural measurement wavelengths, e.g., the magnituderelations, and relations such that which and how much is larger.Further, using the Mahalanobis distances between the printed medium andthe respective reference printing media, the spectral intensity of thereference printing medium to which the spectral intensity of the printedmedium is close may be determined in consideration of variations of thelight intensity at the individual measurement wavelengths and variationsof the relations of the light intensity at the plural measurementwavelengths. Accordingly, the type of the printed medium can bedetermined with high accuracy and the image can be appropriately printedon the printed medium. Obviously, the same type of reference printingmedium as the printed medium may not exist in the plural types ofreference printing media stored in advance. However, even in this case,the image processing in response to the reference printing mediumnearest the printed medium is performed, and the image can beappropriately printed on the printed medium.

In the printing apparatus according to the aspect of the invention, theprocessing may be performed in the following manner. First, principalcomponent analysis is performed on the spectral intensity and pluralprincipal component values with respect to the predetermined pluralprincipal components are extracted. Further, the plural principalcomponent values of the average spectral intensity obtained with respectto the plural principal components are stored as average spectralintensity. Furthermore, the covariances between the plural principalcomponent values of the spectral intensity obtained with respect to theplural principal components are stored as the covariance information.Then, after the spectral intensity with respect to the printed medium ismeasured, the plural principal component values may be extracted fromthe obtained spectral intensity and the Mahalanobis distances withrespect to the respective reference printing media may be calculatedusing the principal component values.

By performing the principal component analysis to extract the principalcomponent values from the spectral intensity, the characteristics of thespectral intensity may be expressed using the principal component valueswith the smaller number than the number of the measurement wavelengths.Therefore, by calculating the Mahalanobis distances using the principalcomponent values, the Mahalanobis distances may be calculated morerapidly than the calculation of the Mahalanobis distances using thespectral intensity. Further, the fact that the characteristics of thespectral intensity may be expressed using the smaller number ofprincipal component values means that the noise is removed and thecharacteristics are emphasized. Therefore, by calculating theMahalanobis distances using the principal component values, the type ofprinted medium can be determined more stably without being affected bynoise.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be described with reference to the accompanyingdrawings, wherein like numbers reference like elements.

FIG. 1 is an explanatory diagram showing a general configuration of aprinting apparatus of an embodiment.

FIG. 2 is a sectional view showing a general structure of a printingmedium discriminator mounted on the printing apparatus.

FIGS. 3A and 3B are perspective views showing an outer shape of aspectroscope mounted on the printing medium discriminator.

FIG. 4 is an exploded view of the spectroscope mounted on the printingmedium discriminator.

FIG. 5 is a sectional view showing an internal structure of thespectroscope mounted on the printing medium discriminator.

FIG. 6 is an explanatory diagram for exemplification of data of aspectrum obtained in the printing medium discriminator.

FIGS. 7A to 7E are explanatory diagrams of a covariance matrix obtainedfrom measurement results of spectral reflectance at plural times.

FIG. 8 is an explanatory diagram showing covariance matrices obtainedwith respect to plural types of printing media.

FIG. 9 is a flowchart of printing processing performed in the printingapparatus of the embodiment.

FIG. 10 is a flowchart of processing performed for discrimination of thetypes of printing media in the printing processing.

FIGS. 11A to 11E are explanatory diagrams of a Mahalanobis distance.

FIG. 12 is an explanatory diagram showing discrimination of the types ofprinting media based on the Mahalanobis distances.

FIG. 13 is an explanatory diagram showing storage of color conversiontables in response to the types of printing media.

FIG. 14 is an explanatory diagram showing development of the covariancematrix using plural eigenvalues and column vectors corresponding to therespective eigenvalues.

FIG. 15 is an explanatory diagram showing extraction of principalcomponent values with respect to principal component vectors frommeasurement data of spectral reflectance.

FIG. 16 is a flowchart of medium type discrimination processing of amodified example.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

As below, embodiments will be explained in the following order forclarification of the invention.

A. Apparatus Configuration

-   -   A-1. Configuration of Printing Apparatus    -   A-2. Configuration of Spectroscope

B. Covariance Matrix

C. Printing Processing

D. Modified Example

A. APPARATUS CONFIGURATION A-1. Configuration of Printing Apparatus

FIG. 1 is an explanatory diagram showing a general configuration of aprinting apparatus 10 of the embodiment. The printing apparatus 10 ofthe embodiment is the so-called inkjet printer of printing images byinjecting inks on a surface of a printing medium 2. The printingapparatus 10 has an outer shape of a nearly box shape, and a front cover11 is provided nearly at the center on the front face and pluraloperation buttons 15 are provided adjacent to the cover. The front cover11 is pivotally supported at the lower end side and, when the upper endside is pulled open, an elongated eject opening 12 from which theprinting medium 2 is ejected appears. Further, a paper feed tray 13 isprovided at the rear side of the printing apparatus 10. When theprinting medium 2 is set in the paper feed tray 13 and the operationbutton 15 is operated, the printing medium 2 is drawn from the paperfeed tray 13, an image is printed on the surface of the printing medium2 within the printing apparatus 10, and then, the medium is ejected fromthe eject opening 12.

Within the printing apparatus 10, an injection head 20 that injects inkson the printing medium 2 while reciprocating in the main scan direction,a drive mechanism 30 that reciprocates the injection head 20, etc. aremounted. On the bottom surface side (the side facing the printing medium2) of the injection head 20, plural injection nozzles are provided andinks may be injected from the injection nozzles toward the printingmedium 2. The drive mechanism 30 includes a timing belt 32 having pluralteeth formed inside, a drive motor 34 for driving the timing belt 32,etc. The timing belt 32 is fixed to the injection head 20 at one point.Accordingly, when the timing belt 32 is driven, the injection head 20reciprocates in the main scan direction while being guided by guiderails (not shown) extended in the main scan direction.

Further, within the printing apparatus 10, a carrying mechanism (notshown) for carrying the printing medium 2 in a direction (sub-scandirection) orthogonal to the main scan direction is mounted. In FIG. 1,the path in which the printing medium 2 is carried within the printingapparatus 10 is shown by a thick broken line. An image may be printed onthe printing medium 2 by gradually moving the position of the printingmedium 2 using the carrying mechanism while inks are injected with theinjection head 20 reciprocated in the main scan direction. Within theprinting apparatus 10, a control unit 90 that controls the operations ofthe injection head 20, the drive mechanism 30, and the carryingmechanism is also mounted. The control unit 90 performs predeterminedimage processing on image data of an image to be printed, and then,determines an amount of injection of inks based on the result. Then, theimage is printed by controlling the injection head 20, the drivemechanism 30, and the carrying mechanism. Further, the control unit 90includes a memory 92 that stores various programs for image processingand various data.

Here, it is desirable to change the image processing to be performed onthe image data depending on the type of the printing medium 2. As thesimplest example, if the printing medium 2 is yellowish than usual, ayellowish image is obtained by usual printing. Accordingly, for printingthe image with yellow suppressed than usual, it is desirable to changethe image processing. Further, when the inks run on the surface of theprinting medium 2, the injected inks may be mixed and the image qualitymay be deteriorated. Furthermore, when the printing medium 2 is swelledby the inks, wrinkles appear on the surface and causes deterioration ofthe image quality. The degree of running and the degree of swelling ofthe inks vary depending on the type of printing medium 2, and theproblem is avoidable by changing the image processing in response to thetype of printing medium 2.

Accordingly, in the printing apparatus 10 of the embodiment, a printingmedium discriminator 50 is mounted on the location of the paper feedtray 13 where the printing medium 2 is set (below the set printingmedium 2). In FIG. 1, the printing medium discriminator 50 is shown byhatched lines. The printing medium 2 set in the paper feed tray 13 iscarried below the injection head 20 through above the printing mediumdiscriminator 50. In this regard, the control unit 90 can discriminatethe type of the printing medium 2 on which the image is to be printedusing the printing medium discriminator 50. The printing medium 2 thetype of which is discriminated using the printing medium discriminator50 corresponds to “printed medium” according to the invention.

Note that, in the printing apparatus 10 of the embodiment, the printingmedium discriminator 50 mounted below the printing medium 2 isexplained, however, the printing medium discriminator 50 may be mountedabove the printing medium 2. In the case where the printing mediumdiscriminator 50 is mounted below the printing medium 2, when theprinting medium discriminator 50 is mounted on the paper feed tray 13,the distance between the printing medium discriminator 50 and theprinting medium 2 is constant independently of the number of printingmedia 2 set in the paper feed tray 13. Accordingly, when the printingmedium 2 is set in the paper feed tray 13 (i.e., before the start ofcarrying the printing medium 2), the type of the printing medium 2 maybe discriminated.

On the other hand, in the case where the printing medium discriminator50 is mounted above the printing medium 2, when the printing mediumdiscriminator 50 is mounted above the paper feed tray 13, the distancebetween the printing medium discriminator 50 and the printing medium 2changes depending on the number of printing media 2 set in the paperfeed tray 13, and stable discrimination of the type of the printingmedium becomes difficult. Accordingly, the printing medium discriminator50 is mounted in the carrying path of the printing medium 2 from thepaper feed tray 13, and the type of the printing medium 2 being carriedis discriminated. In this case, the type of the printing medium 2 isdiscriminated after the start of carrying the printing medium 2, andthus, even with time constraints on the discrimination, there is anadvantage that the type of the printing medium 2 may be discriminated bydetecting the surface on which the image is printed (printing surface).

FIG. 2 is a sectional view showing a general structure of the printingmedium discriminator 50 mounted on the printing apparatus 10 of theembodiment. As illustrated, the printing medium discriminator 50includes a light source 52 that applies light to an object (here, theprinting medium 2), a light receiving unit 54 that detects lightintensity of the light reflected on the printing medium 2 (reflectedlight), a control unit 56 that controls the operations of the lightsource 52 and the light receiving unit 54, and a case 58 that containsthem. Further, the light receiving unit 54 includes a lens system 54 athat collects reflected light from the printing medium 2, a spectroscope100 that spectroscopically separates the light collected by the lenssystem 54 a, a lens system 54 b that guides the light spectroscopicallyseparated by the spectroscope 100 to a light sensor 54 c.

The control unit 56 controls the light source 52 to apply light withpredetermined intensity toward the printing medium 2. As the lightsource 52, a halogen lamp, an LED, or the like may be used, and it isdesirable that the light source can generate light in a certainwavelength range (visible range, ultraviolet range, or the like).Further, the spectroscope 100 functions as the so-called bandpass filterof transmitting only the light in a specific narrow wavelength range.The wavelength of the light to be transmitted may be continuouslychanged or changed among plural wavelengths. As will be specificallyexplained later, in the embodiment, the extremely small spectroscope 100using the so-called principle of Fabry-Perot interferometer is used.

The light sensor 54 c generates a signal in response to the receivedlight intensity like the so-called photodiode. The control unit 56detects the signal from the light sensor 54 c while changing thewavelength of the light to be transmitted by controlling thespectroscope 100, and thereby, detects the spectrum of the reflectedlight (light intensity data at the respective wavelengths). Further, ifthe spectrum of the light (the spectrum of irradiation light) applied tothe printing medium 2 by the light source 52 is checked in advance, thespectral reflectance can be obtained by calculating the ratio of thespectrum of the reflected light to the spectrum of the irradiation lightat the time.

A-2. Configuration of Spectroscope

FIGS. 3A and 3B are perspective views showing an outer shape of thespectroscope 100 used in the printing apparatus 10 of the embodiment.FIG. 3A shows the spectroscope 100 as seen from the side at which lightenters, and FIG. 3B shows the spectroscope 100 as seen from the side atwhich light exits. Note that the arrows shown by dashed-dotted lines inthe drawings indicate the direction of the light entering thespectroscope 100 and the direction of the light exiting from thespectroscope 100.

As shown in FIG. 3A, the spectroscope 100 includes a first substrate 110and a second substrate 120 stacked thereon. The first substrate 110 andthe second substrate 120 are formed using a silicon material(crystalline silicon or amorphous silicon) or a glass material. Thethickness of the first substrate 110 is about 2000 μm at most(typically, 100 to 1000 μm), and the thickness of the second substrate120 is about 500 μm at most (typically, 10 to 100 μm). Further, in thefirst substrate 110, an anti-reflection film 110AR is formed on thesurface at the side at which light enters. Into the spectroscope 100,light enters from a part of the surface with the anti-reflection film110AR formed thereon (the part surrounded by a thin broken line in thedrawing). The anti-reflection film 110AR includes a dielectricmultilayer film, and has a function of preventing reflection of thelight entering the spectroscope 100.

As shown in FIG. 3B, an anti-reflection film 120AR is formed in acircular shape at the center on the surface (i.e., the second substrate120) at the rear side (the side at which light exits) of thespectroscope 100. The anti-reflection film 120AR formed on the secondsubstrate 120 also includes a dielectric multilayer film like theanti-reflection film 110AR of the first substrate 110. However, theanti-reflection film 120AR of the second substrate 120 has a function ofpreventing the light to exit from the spectroscope 100 to the outsidefrom being reflected on the surface of the second substrate 120 orreturned into the spectroscope 100. Further, in the second substrate120, thin slits 120 s are formed to surround the anti-reflection film120AR, and the slits 120 s penetrate the second substrate 120.Furthermore, lead holes 120 a, 120 b having nearly rectangular shapesare also formed in the second substrate 120.

FIG. 4 is an exploded view showing a structure of the spectroscope 100.Note that, as has been described above using FIGS. 3A and 3B, in thespectroscope 100, the surface at the light incident side (firstsubstrate 110) is a simple flat surface, however, the inner side of thefirst substrate 110 (the side facing the second substrate 120) has acomplex shape. Accordingly, for clearly showing the inner shape of thefirst substrate 110, FIG. 4 shows the exploded view in the state inwhich the spectroscope 100 is turned over (the state with the secondsubstrate 120 on the first substrate 110 as shown in FIG. 3B).

As described above, in the second substrate 120, the slits 120 s (seeFIG. 3B) are formed to surround the anti-reflection film 120AR at thecenter, and the slits 120 s penetrate the second substrate 120. As aresult, as shown in FIG. 4, the second substrate 120 is divided into acenter round movable part 122 (the part in which the anti-reflectionfilm 120AR is formed), a peripheral part 126 outside of the movablepart, and plural (four in the illustrated example) connection parts 124connecting the movable part 122 and the peripheral part 126.

To the inner side (the side facing the first substrate 110) surface ofthe second substrate 120, a second electrode 128 is bonded. As shown inFIG. 4, the second electrode 128 includes a drive electrode part 128 ahaving an annular shape and a lead electrode part 128 b extending fromthe drive electrode part 128 a, and is formed using a metal foil havinga thickness of about 0.1 to 5 μm. The second electrode 128 is positionedwith respect to the second substrate 120 so that the drive electrodepart 128 a having the annular shape may be concentric with the movablepart 122 of the second substrate 120 and the end of the lead electrodepart 128 b may be located in the position of the lead hole 120 a of thesecond substrate 120.

On the other hand, on the inner side (the side facing the secondsubstrate 120) surface of the first substrate 110, a first recess part112 is formed, and further, a circular second recess part 114 is formedat the center of the first recess part 112. Note that the region shownby the thin broken line in FIG. 3A (the region where light enters thespectroscope 100) corresponds to the part of the bottom of the secondrecess part 114. Further, the shape of the first recess part 112 roughlycorresponds to the shapes of the movable part 122 and the connectionparts 124 of the second substrate 120. Furthermore, the first recesspart 112 is extended to a location corresponding to the lead hole 120 bof the second substrate 120.

To the first recess part 112, a first electrode 118 is bonded. The firstelectrode 118 also includes a drive electrode part 118 a having anannular shape and a lead electrode part 118 b extending from the driveelectrode part 118 a, and is formed using a metal foil having athickness of about 0.1 to 5 μm like the above-described second electrode128. Further, the first electrode 118 is positioned so that the driveelectrode part 118 a having the annular shape may be concentric with thecircular second recess part 114. The spectroscope 100 of the embodimentis formed by bonding of the above-described second substrate 120 andfirst substrate 110.

FIG. 5 is a sectional view showing an internal structure of thespectroscope 100 of the embodiment. The section location is the A-Alocation shown in FIG. 3B. As described above, the second electrode 128is provided on the second substrate 120 and the first electrode 118 isprovided within the first recess part 112 on the first substrate 110.Accordingly, a gap G1 nearly corresponding to the depth of the firstrecess part 112 is formed between the drive electrode part 128 a of thesecond electrode 128 and the drive electrode part 118 a of the firstelectrode 118.

Further, on a bottom surface of the second recess part 114 provided inthe first substrate 110, a first reflection film 110HR of a dielectricmultilayer film is formed. Furthermore, a second reflection film 120HRof a dielectric multilayer film is formed to face the first reflectionfilm 110HR in the second substrate 120. Therefore, a gap G2 is alsoformed between the first reflection film 110HR and the second reflectionfilm 120HR. The first reflection film 110HR and the second reflectionfilm 120HR have functions of reflecting light with high reflectance.Accordingly, the light entering the spectroscope 100 as shown by thearrows of dashed dotted lines in the drawing is repeatedly reflected atmany times between the second reflection film 120HR and the firstreflection film 110HR, and the so-called Fabry-Perrot interferometer isformed. As a result, the lights having wavelengths that do not fulfillthe interference condition determined by the distance of the gap G2 arerapidly attenuated on the surfaces of the first reflection film 110HRand the second reflection film 120HR due to the interference of lights,and only the lights having wavelengths that fulfill the interferencecondition are output from the spectroscope 100 to the outside.

Further, the distance of the gap G2 can be changed in the followingmanner. First, the drive electrode part 128 a of the second electrode128 is provided in the movable part 122 of the second substrate 120, andthe lead electrode part 128 b of the second electrode 128 can beaccessed from the lead hole 120 a formed in the second substrate 120.Furthermore, the drive electrode part 118 a of the first electrode 118is provided to face the drive electrode part 128 a of the secondelectrode 128 on the first substrate 110, and the lead electrode part118 b of the first electrode 118 can be accessed from the lead hole 120b of the second substrate 120 (see FIG. 4). Accordingly, when thevoltage with the same polarity is applied from the lead holes 120 a, 120b to the second electrode 128 and the first electrode 118, the driveelectrode part 128 a of the second electrode 128 and the drive electrodepart 118 a of the first electrode 118 are charged with the samepolarity, and repulsive forces to each other may be generated.

Further, since the movable part 122 of the second substrate 120 is onlysupported by the peripheral part 126 via the elongated connection parts124, the connection parts 124 are deformed by the repulsive forcesacting between the drive electrode part 128 a of the second electrode128 and the drive electrode part 118 a of the first electrode 118 andthe gap G1 becomes wider, and thus, the gap G2 also becomes wider. Whenthe applied voltage is increased, the repulsive forces also increase,and the gap G2 becomes even wider. When the drive electrode part 128 aof the second electrode 128 and the drive electrode part 118 a of thefirst electrode 118 are charged with opposite polarities, attractiveforces are generated, and thus, the gap G2 may be made narrower.

In this manner, in the spectroscope 100 of the embodiment, the distanceof the gap G2 may be changed by applying the voltages from the leadholes 120 a, 120 b formed in the second substrate 120 to the secondelectrode 128 and the first electrode 118. As a result, the interferencecondition may be changed between the second reflection film 120HR andthe first reflection film 110HR, and only the wavelength that fulfillsthe interference condition may be output from the spectroscope 100. Theprinting medium discriminator 50 shown in FIG. 2 detects the data(spectrum) of the light intensity at the respective wavelengths bydetecting the intensity of the light output from the spectroscope 100using the light sensor 54 c in the above-described manner.

FIG. 6 exemplifies data of the spectrum obtained in the above-describedmanner. The illustrated example shows a result of measurement of lightintensity at plural wavelengths at predetermined wavelength intervals(10 nm) in a certain wavelength range (400 nm to 700 nm). Further, thelight intensity obtained at the respective wavelengths is divided by theintensity at the wavelengths contained in the irradiation light from thelight source 52, and thereby, reflectances at the respective wavelengths(spectral reflectance) can be calculated. Note that, in the exampleshown in FIG. 6, the light intensity at 31 wavelengths are measured,however, the points of measurement may be less or more.

Further, while the numeric values of the light intensity changedepending on the intensity of incident light, the reflectance takesvalues independent of the light source intensity or the light receivingelement sensitivity and convenient. Accordingly, as below, thereflectance will be exclusively used. Note that the data of lightintensity at the respective wavelengths (or data of reflectances at therespective wavelengths) exemplified in FIG. 6 corresponds to “spectralintensity” according to the invention and the wavelength at which thelight intensity or the reflectance is obtained corresponds to“measurement wavelength” according to the invention. Further, theprinting medium discriminator 50 that measures the data of lightintensity at the respective wavelengths (or data of reflectances at therespective wavelengths) corresponds to “spectral intensity measurementunit” according to the invention.

The spectral reflectance as shown in FIG. 6 varies according to thetypes of printing media 2. Therefore, the types of printing media 2 canbe discriminated by measuring the spectral reflectance with respect tothe printing media 2 (before images are printed thereon) set in thepaper feed tray 13 of the printing apparatus 10. In this regard,measurement values of light intensity vary. Further, even the same typeof printing media 2, measurement values may vary depending on thedifference in measurement position or the difference in production lot.Therefore, even in the case where the spectral reflectances are notcompletely the same, the printing media 2 should be determined to be ofthe same type. However, when the acceptable range is made wider,erroneous determination is easily made.

On this account, in the printing apparatus 10 of the embodiment,variations of measurement values obtained at different wavelengths arechecked and a kind of statistic called Mahalanobis distance arecalculated based on the results, and thereby, the types of printingmedia 2 can be discriminated with high accuracy. As below, a matrix(covariance matrix) showing relations of measurement values amongdifferent wavelengths will be explained, and then, processing ofdiscriminating the types of printing media 2 using the Mahalanobisdistances and printing images will be explained.

B. COVARIANCE MATRIX

FIGS. 7A to 7E are explanatory diagrams showing a method of obtaining acovariance matrix by repeated measurement of spectral reflectance withrespect to a certain printing medium 2 at plural times. FIG. 7A shows ameasurement result of spectral reflectance obtained with respect to acertain type of printing medium 2. In measurement, plural times (here,50 times) of measurements were performed in different measurementpositions and production lots of the printing medium 2. The whitecircles shown in FIG. 7A show average values of reflectance obtained atthe respective wavelengths by the plural times of measurements. Further,the arrows extending from the white circles in the vertical directionsshow variations (variances) of the measurement values. Here, the averagevalues and the variances shown in FIG. 7A are numeric values separatelycalculated at the respective wavelengths, and do not show the relationsamong the wavelengths. Anything more than that the reflectances vary tonearly the same extent at wavelength n5 and wavelength n9 is not known.However, by obtaining covariance, the relations among the respectivewavelengths may be known.

FIGS. 7B and 7C exemplify distribution charts showing relations betweenthe reflectances at wavelength n5 and the reflectances at wavelength n9obtained at each of the measurements. AV5 in the chart indicates theaverage value of the reflectance at wavelength n5 and AV9 in the chartindicates the average value of the reflectance at wavelength n9.Further, the black arrows indicate variances of reflectances at therespective wavelengths. Both distribution charts in FIG. 7B and FIG. 7Cshow the same variance with respect to wavelength n5 alone and the samevariance with respect to wavelength n9 alone. However, as clearly seenfrom the two distribution charts, the relations between measurementvalues obtained at the two wavelengths are largely different.

The distribution chart in FIG. 7B shows the tendency that, when themeasurement values at wavelength n5 are larger than the average valueAV5, the measurement values at wavelength n9 are smaller than theaverage value AV9, and conversely, when the measurement values atwavelength n5 are smaller, the measurement values at wavelength n9 arelarger. On the other hand, the distribution chart in FIG. 7C does notshow any tendency like that. The distribution situation between the twowavelengths may be expressed using an index called covariance.

FIG. 7D shows a calculation formula for obtaining the covariance s59between wavelength n5 and wavelength n9. The n5, n9 in the formula isreflectance at wavelength n5 or wavelength n9 obtained at each of themeasurements. Further, N in the formula is the number of times ofmeasurements (here, 50 times). When the downward-sloping distribution isobtained as shown in FIG. 7B, the covariance takes a negative value and,when the upward-sloping distribution is obtained, the covariance takes apositive value. Further, as shown in FIG. 7C, as the distributiontendency diminishes, the covariance value becomes smaller. Therefore, byobtaining the covariance of the reflectances obtained at two wavelengths(here, wavelength n5 and wavelength n9), the distribution situationbetween the two wavelengths may be known. Conversely, as shown in FIG.7A, only by simply obtaining the average values and the variances at therespective wavelengths, information on the distribution situationbetween the wavelengths shown in FIGS. 7B and 7C (i.e., information onthe relations of reflectance between wavelengths) is discarded.

As above, the covariance s59 expressing the relation of reflectancebetween the wavelengths has been explained while attention is focused onwavelength n5 and wavelength n9. Obviously, the covariances may beconsidered with respect to all combinations of wavelengths. A covariances12 may be obtained by focusing attention on wavelength n1 andwavelength n2, and a covariance s13 may be obtained by focusingattention on wavelength n1 and wavelength n3. In this manner, thecovariances obtained with respect to all combinations of wavelengthsexpressed in a form of matrix are a matrix called “covariance matrix”shown in FIG. 7E. Note that the values of diagonal elements (s11, s22,etc.) are variances as clearly seen from the calculation formula of FIG.7D. The s11 indicates the variance of the reflectances obtained atwavelength n1 and the s22 indicates the variance of the reflectancesobtained at wavelength n2. Further, as clearly seen from the calculationformula for obtaining the covariance shown in FIG. 7D, relations ofs12=s21, s13=s31, . . . hold. Therefore, the covariance matrix must be asymmetric matrix.

In the embodiment, the above-described covariance matrices are obtainedwith respect to commercially available 36 types of printing media 2 inadvance. FIG. 8 exemplifies covariance matrices RA, RB, RC . . .obtained with respect to the respective printing media 2. In the memory92 of the control unit 90 of the printing apparatus 10 of theembodiment, the covariance matrices with respect to the 36 types ofsamples are stored in advance. Further, the average values of thereflectances at the respective wavelengths (hereinafter, referred to as“average spectral reflectance”) are obtained with respect to therespective printing media 2 in advance and stored in the memory 92 ofthe control unit 90. Furthermore, when images are printed, the spectralreflectances of the printing media 2 are detected using the printingmedium discriminator 50 (see FIG. 1) and the types of printing media 2are discriminated using the average spectral reflectances and thecovariance matrices stored in the memory 92 of the control unit 90. Inthis manner, images can be appropriately printed in response to thetypes of printing media 2.

As below, printing processing performed in the printing apparatus 10 ofthe embodiment will be explained. Note that the plural types of printingmedia 2 having the average spectral reflectances and the covariancematrices stored correspond to “reference printing media” according tothe invention. Further, the average spectral reflectance corresponds to“average spectral intensity” according to the invention, and thecovariance matrix corresponds to “covariance information” according tothe invention. Furthermore, the memory 92 of the control unit 90 thatstores the average spectral reflectances and the covariance matricescorresponds to “average spectral intensity memory unit” and “covarianceinformation memory unit”.

C. PRINTING PROCESSING

FIG. 9 is a flowchart of the printing processing performed in theprinting apparatus 10 of the embodiment. This processing is executed bythe control unit 90. In the printing processing, first, processing ofdiscriminating the types of printing media 2 (medium type discriminationprocessing) is started using the printing medium discriminator 50 (stepS10).

FIG. 10 shows a flowchart of the medium type discrimination processing.When the medium type discrimination processing is started, the spectralreflectance of the printing medium 2 is measured using the printingmedium discriminator 50 (step S100). That is, as has been explainedusing FIG. 5, while the distance of the gap G2 is changed by changingthe voltages applied to the first electrode 118 and the second electrode128 of the spectroscope 100, the light intensity is detected by thelight sensor 54 c. As a result, the spectral reflectance as exemplifiedin FIG. 6 may be measured.

Subsequently, the Mahalanobis distances between the measured spectralreflectance and the respective samples are calculated (step S102). Inthe embodiment, the commercially available 36 types of printing media 2are prepared as samples and the average spectral reflectances and thecovariance matrices with respect to the respective samples are stored inadvance, and thus, 36 Mahalanobis distances are calculated. Here, theMahalanobis distance will be explained.

FIGS. 11A to 11E are explanatory diagrams conceptually showing what isthe Mahalanobis distance. When an average value a with respect to acertain group (here, Gr. A) and an average value b with respect toanother group (here, Gr. B) are known and a measurement value x withrespect to a new specimen is obtained, if the measurement value x isnearer the average value a than the average value b (if deviation issmaller) as shown in FIG. 11A, the specimen is normally considered tobelong to the Gr. A. However, this holds on the assumption thatvariations of the measurement values are nearly equal between the Gr. Aand the Gr. B. Therefore, in consideration of the variations of themeasurement values of the Gr. A and the Gr. B, the conclusion may beopposite.

In the case exemplified in FIG. 11B, even if the measurement value x ofthe specimen is nearer the average value a than the average b, thespecimen is considered to belong to the Gr. B. That is, it is sure thatthe deviation between the measurement value x and the average value a issmaller than the deviation between the measurement value x and theaverage value b, however, the deviation between the measurement value xand the average value a is too large compared to the variations of themeasurement values of the Gr. A for the consideration that the specimenbelongs to the Gr. A. On the other hand, the deviation between themeasurement value x and the average value b is smaller than thevariations of the measurement values of the Gr. B, and the considerationthat the specimen belongs to the Gr. B is rather natural.

As described above, by taking into account not only the deviationsbetween the measurement values and the average values but also theratios of the deviations to the variations (variance) of the measurementvalues, more correct determination may be made. The Mahalanobis distanceis an index indicating to which group the specimen belongs by alsotaking the variations of the measurement values into consideration. Thehigher the probability that the specimen belongs to a certain group, thesmaller the Mahalanobis distances with respect to the group.

As exemplified in FIG. 11B, when the measurement value x isone-dimensional, the deviation between the measurement value and theaverage value is squared and the value is divided by the variance, andthereby, the Mahalanobis distance (to be precise, the square value ofthe Mahalanobis distance) may be calculated. FIG. 11C shows acalculation formula for obtaining the Mahalanobis distance. Here, x inthe formula is the measurement value, av is the average value, s isvariance.

Further, the Mahalanobis distance may be extended to multidimension. Asthe simplest case, a two-dimensional Mahalanobis distance will beexplained. In the case of the two dimensions, two measurement values ofx1, x2 are obtained at each measurement. Furthermore, regarding thevariance, not only the variance with respect to x1 and the variance withrespect to x2 but also the covariance between x1 and x2 may beconsidered. Accordingly, a calculation formula for obtaining thetwo-dimensional Mahalanobis distance shown in FIG. 11D may be obtainedby replacing the measurement value x of the calculation formula shown inFIG. 11C with a vector (x1,x2) and replacing the variance s with acovariance matrix. Note that av1, av2 in the formula are average valuesof x1, x2, respectively. Further, “−1” attached to as a superscript ofthe covariance matrix indicates an inverse matrix. Furthermore, “T”attached to the vector (x1,x2) indicates a transposed vector.

In the calculation formula shown in FIG. 11D, when the vector(x1−av1,x2−av2) is expressed by the capital “X” and the covariancematrix is expressed by the capital “R”, the calculation formula of thetwo-dimensional Mahalanobis distance may be expressed by FIG. 11E. Thecalculation formula in FIG. 11E may be used as a multidimensionalMahalanobis distance calculation formula of the three or more dimensionsas it is. That is, when the n-dimensional Mahalanobis distances arecalculated, “X” is a vector having n elements and “R” is a covariancematrix of n rows and m columns.

As above, the Mahalanobis distance has been explained, and the spectralreflectance obtained at step S100 in FIG. 10 includes reflectances at nwavelengths, n-dimensional measurement values (see FIG. 6). Further, thecovariance matrix obtained from the spectral reflectance is a matrix ofn rows and n columns (see FIG. 7E). Furthermore, average spectralreflectances and covariance matrices with respect to plural samples arestored in advance in the memory 92 mounted on the control unit 90 of theprinting apparatus 10.

In the medium type discrimination processing shown in FIG. 10, when thespectral reflectance of the printing medium 2 is measured (step S100),at the subsequent step S102, the Mahalanobis distances to the respectivesamples are calculated from the measured spectral reflectance using thecalculation formula in FIG. 11E. Then, the sample having the smallestvalue of the Mahalanobis distance is detected (step S104), and theprinting medium 2 is determined to be the same type as the sample (stepS106). Note that, in the embodiment, the control unit 90 calculates theMahalanobis distances to the respective samples, and the control unit 90corresponds to “Mahalanobis distance acquisition unit” according to theinvention.

FIG. 12 is an explanatory diagram showing results of discrimination ofthe types of printing media based on the Mahalanobis distances withrespect to the plural printing media 2. Regarding the printing medium 2of specimen 1, the Mahalanobis distances with respect to the respectivesamples are calculated such that the Mahalanobis distance with respectto sample A is “1”, the Mahalanobis distance with respect to sample B is“24”, the Mahalanobis distance with respect to sample C is “24”, and theMahalanobis distance with respect to sample D is “11”. Therefore,specimen 1 is determined to be the same type as sample A having thesmallest Mahalanobis distance. The types of printing media 2 may bediscriminated in the same manner with respect to the other specimens.

From confirmation of various printing media 2, the types of printingmedia 2 can be discriminated with a probability of 100%. When the samplenearest the printing medium 2 is identified from the 36 commerciallyavailable samples, the medium type discrimination processing in FIG. 10is ended and the process is returned to the printing processing in FIG.9. Note that the control unit 90 performs the processing of specifyingthe types of printing media 2 based on the Mahalanobis distances, andthe control unit 90 in the embodiment corresponds to “medium typedetermination unit” according to the invention.

As shown in FIG. 9, in the printing processing, the process is returnedfrom the medium type discrimination processing (step S10), imageprocessing is selected in response to the discriminated type of printingmedium 2 (step S20). In the embodiment, image processing is selected bychanging a color conversion table. Here, the color conversion table is atable referred to for determination of the density of inks injected tothe printing medium 2 from image data. In the color conversion table,gray-level values of the image data and data indicating the density ofthe inks injected to the printing medium 2 are associated and stored.

As shown in FIG. 13, the color conversion tables are set with respect toeach printing medium 2 in the memory 92 of the control unit 90 of theembodiment. In these color conversion tables, the density of inks forimage data is set so that optimal images may be obtained inconsideration of colors of the printing media 2, and the degree ofrunning and the degree of swelling of the inks. Accordingly, at stepS20, by selecting the color conversion table corresponding to the typeof printing medium 2 discriminated by the above-described medium typediscrimination processing, the image processing is selected. Note thatthe color conversion tables corresponding to the printing media 2 arestored in the memory 92 of the control unit 90, and the memory 92 of thecontrol unit 90 in the embodiment corresponds to “image processingmemory unit” according to the invention.

Then, the selected image processing is performed on the image data ofthe images to be printed (step S30). In the embodiment, processing ofconverting the image data into data indicating the density of inks withreference to the selected color conversion table, and then, determiningthe amount of injection and the time of injection of inks from thenozzles of the injection head 20 based on the obtained data isperformed. Then, the image is printed on the printing medium 2 byactually injecting the inks while carrying the printing medium 2 littleby little and performing main scan of the injection head 20 based on theprocessing result (step S40), and then, the printing processing in FIG.9 is ended. Note that the control unit 90 performs processing ofexecuting the selected image processing and printing the image on theprinting medium 2, and the control unit 90 in the embodiment correspondsto “image printing unit” according to the invention.

As described above, in the printing apparatus 10 of the embodiment, thetypes of printing media 2 are discriminated prior to printing of images,and the images are printed in response to the discrimination results.Accordingly, even when the operator of the printing apparatus 10 doesnot set the types of printing media 2, the types of printing media 2 maybe automatically discriminated and the images may be appropriatelyprinted. Further, setting of carrying conditions (thickness, feedingspeed, etc.) of the printing media 2, setting of drying conditions ofthe printing media 2, etc. can be automatically performed.

Further, when the types of printing media 2 are discriminated, theaverage spectral reflectances and the covariance matrices with respectto the plural samples are stored in advance, the Mahalanobis distanceswith respect to the respective samples are calculated, and thereby, thetypes of printing media 2 are discriminated. As has been described usingFIGS. 7A to 7E, using the covariance, not only variations (variances) ofthe measurement values at the respective wavelengths but also relationsamong plural wavelengths (distribution situations or the like) may beconsidered. Therefore, by discriminating the types of printing media 2based on the Mahalanobis distances calculated using the average spectralreflectances and the covariance matrices, the sample nearest themeasured spectral reflectance may be selected in consideration not onlyof the reflectances at the respective wavelengths but also of therelations of the reflectances among the respective wavelengths.

Accordingly, the types of printing media 2 can be correctlydiscriminated with a high probability (a probability of 100% from theactually confirmed result). As a result, images are not printed witherroneous setting of the types of printing media 2 because the operatorof the printing apparatus 10 makes wrong setting of the types ofprinting media 2 or forgets the setting and the previous settingremains, and the images can be always appropriately printed.

Obviously, the printing medium 2 the spectral reflectance of which hasbeen measured may be another printing medium 2 (so-called unknownprinting medium 2) than the types of printing media 2 with data storedas samples. In this case, the printing medium 2 is determined as thetype of printing medium 2 different from that actual one. However, thedetermination that the printing medium is the same type of the samplehaving the smallest Mahalanobis distance is equal to the determinationthat the sample is the nearest the printing medium 2. Therefore, evenwith the unknown printing medium 2, the image processing considered tobe most appropriate in the range that the printing apparatus 10 canperform is performed, and images can be appropriately printed thereon.

D. MODIFIED EXAMPLE

In the above-described embodiment, the Mahalanobis distances arecalculated using the spectral reflectance measured by the printingmedium discriminator 50 as it is. The spectral reflectance obtained bythe printing medium discriminator 50 is reflectances at the plural (31points in the example shown in FIG. 6) wavelengths and the Mahalanobisdistances are calculated in multidimension (31 dimensions in the exampleshown in FIG. 6). The smaller the number of wavelengths for measurement,the faster the measurement and the faster the calculation of theMahalanobis distances, however, when the number of wavelengths formeasurement is reduced, deterioration in discrimination accuracy ofprinting media 2 is concerned. Accordingly, the Mahalanobis distancesare not calculated using the spectral reflectance obtained by theprinting medium discriminator 50 as it is, but the types of printingmedia 2 maybe discriminated by reducing the number of dimensions of thespectral reflectance using principal component analysis and calculatingthe Mahalanobis distances in the reduced number of dimensions. As below,a modified example of the medium type discrimination processing will beexplained.

First, a method of reducing the number of dimensions using the principalcomponent analysis will be explained. Note that the principal componentanalysis itself is a known method, and only the outline thereof will beexplained. To reduce the number of dimensions using the principalcomponent analysis, it is necessary to obtain principal componentvectors. The principal component vectors may be obtained by variousmethods, and here, a method using a covariance matrix will be explained.The covariance matrix is a symmetric matrix, and the plural eigenvectorsare orthogonal and eigenvalues corresponding to the respectiveeigenvectors are real numbers. Further, the covariance matrix may bedeveloped using these plural eigenvectors and the eigenvaluescorresponding to the respective eigenvectors.

FIG. 14 shows development of the covariance matrix R using pluraleigenvalues λ and column vectors corresponding to the respectiveeigenvalues λ. Note that U₁ in the formula is the first eigenvector andλ1 is the eigenvalue corresponding to U₁. Further, U₂ in the formula isthe second eigenvector and λ2 is the eigenvalue corresponding to U₂.Subsequently, likewise, U_(n) in the formula is the nth eigenvector andλn is the eigenvalue corresponding to U_(n). The eigenvalues and theeigenvectors exist in the numbers corresponding to the number ofdimensions of the covariance matrix R. The higher eigenvectors of theobtained eigenvectors are used as the principal component vectors, andthereby, only the number of dimensions may be reduced with little lossof the information of the spectral reflectance obtained by the printingmedium discriminator 50.

FIG. 15 shows reduction of the number of dimensions of the spectralreflectance obtained by the printing medium discriminator 50 using thehigher eigenvectors as the principal component vectors. In theillustrated example, the higher eight eigenvectors are used as theprincipal component vectors. Note that these principal component vectorsare column vectors having the same number of dimensions as the number ofdimensions of the spectral reflectance. Here, assuming that spectralreflectance data (x1, x2, . . . , xn) is obtained by the printing mediumdiscriminator 50, 31-dimensional data is obtained in the example shownin FIG. 6. The inner product of the spectral reflectance data and thefirst principal component vector U₁ is obtained, and the obtainedprincipal component value is y1.

Further, the inner product of the spectral reflectance data and thesecond principal component vector U₂ is obtained, and the obtainedprincipal component value is y2. In this manner, the inner products withrespect to the respective principal component vectors are obtained, andthe principal component values y in the number corresponding to thenumber of principal component vectors (eight in the example shown inFIG. 15) may be obtained. That is, the number of dimensions of thespectral reflectance obtained by the printing medium discriminator 50(31 dimensions in the case shown in FIG. 6) is reduced to the number ofdimensions corresponding to the number of principal component vectors(eight dimensions in the example shown in FIG. 15). Note that, in theembodiment, the principal component vector corresponds to “principalcomponent” according to the invention.

Further, it is known that, when the number of dimensions is reducedusing the principal component vectors, the original information is lostlittle unlike the case where the number of dimensions is reduced bysimply thinning the wavelengths for measurement of reflectances.Furthermore, the lower eigenvectors are not used as the principalcomponent vectors, however, the principal component values correspondingto the lower principal component vectors are considered to be noisecomponents. Therefore, by reducing the number of dimensions, the noisecomponents can be removed. In the medium type discrimination processingof the modified example, the Mahalanobis distances are calculated usingthe principal component values y in place of the spectral reflectance,and the types of printing media 2 may be discriminated more reliablywithout the influence by the noise components.

FIG. 16 is a flowchart of medium type discrimination processing of themodified example. This processing is executed in place of the mediumtype discrimination processing (step S10) in the printing processingshown in FIG. 9. Also, in the medium type discrimination processing ofthe modified example (step S15), when the processing is started, first,the spectral reflectance of the printing medium 2 is measured using theprinting medium discriminator 50 (step S150). Subsequently, the innerproducts with respect to the plural principal component vectors obtainedin advance are obtained, and the plural principal component values areextracted from the spectral reflectance (step S152). Note that thecontrol unit 90 performs the processing of extracting the principalcomponent values from the spectral reflectance and, in the embodiment,the control unit 90 corresponds to “principal component value extractionunit” according to the invention.

Then, the Mahalanobis distances with respect to the respective samplesare calculated (step S154). In the above-described embodiment, theaverage reflectances and the covariance matrices at the respectivewavelengths obtained by the printing medium discriminator 50 areobtained with respect to each sample, and the Mahalanobis distances withrespect to the respective samples are calculated. On the other hand, inthe modified example, the plural principal component values are used inplace of the reflectances at the respective wavelengths. Accordingly,the average values and the covariance matrices with respect to therespective principal component values are obtained with respect to eachsample and the Mahalanobis distances with respect to the respectivesamples are calculated using them.

Then, the sample having the smallest Mahalanobis distance of therespective samples is detected (step S156), and the type of printingmedium 2 is determined to be the same type as the sample (step S158),and the medium type discrimination processing of the modified exampleshown in FIG. 16 is ended.

In the above-described medium type discrimination processing of themodified example, the number of dimensions for calculation of theMahalanobis distances may be reduced, and the Mahalanobis distances maybe rapidly calculated and the types of printing media 2 may be rapidlydiscriminated. Further, the principal component vectors, the averagevalues of the principal component values, and the covariance matriceswith respect to the principal component values may be obtained inadvance, and the actual calculation is not complex. Obviously, newprocessing of calculating the principal component values with respect toeach principal component vector from the spectral reflectance obtainedby the printing medium discriminator 50 is necessary, however, theprocessing is only to obtain inner products between vectors and ends inan extremely short time. Therefore, the time taken for discrimination ofthe types of printing media 2 can be significantly reduced.

Further, when the spectral reflectance obtained by the printing mediumdiscriminator 50 is converted into the principal component values in thesmaller number of dimensions, the noise components are removed and thecharacteristics with respect to each of the types of printing media 2becomes clearer. As a result, the types of printing media 2 can bediscriminated more reliably in the medium type discrimination processingof the modified example.

As above, the printing apparatus 10 according to the invention has beenexplained using the embodiment and the modified example, and theinvention is not limited to the embodiment and the modified example, butmay be implemented in various forms without departing from the scopethereof.

In the above-described embodiment and modified example, the explanationhas been made such that the spectral intensity is measured by applyingthe light from the light source 52 of the printing medium discriminator50 and detecting the light intensity of the reflected light reflected onthe printing medium 2. However, the spectral intensity may be measuredby detecting the light intensity of the light transmitted through theprinting medium 2, not the light intensity of the reflected light.

Furthermore, in the above-described embodiment and modified example, theexplanation has been made such that the printing apparatus 10 is theso-called inkjet printer. However, the invention may be preferablyapplied to printing apparatuses of different systems such as a laserprinter as long as the printing apparatuses print images by attachingcolor materials onto printing media 2.

The entire disclosure of Japanese Patent Application No. 2011-253727filed on Nov. 21, 2011 is expressly incorporated by reference herein.

What is claimed is:
 1. A printing apparatus comprising: an imageprocessing memory unit that stores image processing to be performed onimage data in response to predetermined plural types of referenceprinting media; a spectral intensity measurement unit that measuresspectral intensity as light intensity at predetermined plural types ofmeasurement wavelengths by applying light to a printed medium before animage is printed thereon; an average spectral intensity memory unit thatstores average spectral intensity obtained by measuring the spectralintensity at plural times and obtaining average values of the spectralintensity with respect to each measurement wavelength with respect tothe plural types of reference printing media; a covariance informationmemory unit that stores covariance information obtained by measuring thespectral intensity at plural times and obtaining covariances of thespectral intensity among the plural measurement wavelengths with respectto the plural types of reference printing media; a Mahalanobis distanceacquisition unit that acquires Mahalanobis distances between the printedmedium and the plural types of reference printing media based on thespectral intensity, the average spectral intensity, and the covarianceinformation; a medium type determination unit that determines a type ofthe printed medium from the plural reference printing media based on theMahalanobis distances; and an image printing unit that performs theimage processing stored in response to the determined reference printingmedium on the image data and prints the image on the printed medium. 2.The printing apparatus according to claim 1, further comprising aprincipal component value extraction unit that extracts plural principalcomponent values with respect to predetermined plural principalcomponents by performing principal component analysis on the spectralintensity, wherein the average spectral intensity memory unit is a unitthat stores the plural principal component values of the averagespectral intensity obtained with respect to the plural principalcomponents as the average spectral intensity, and the covarianceinformation memory unit is a unit that stores the covariances among theplural principal component values of the average spectral intensityobtained with respect to the plural principal components as thecovariance information.
 3. A printing method comprising: storing imageprocessing to be performed on image data in response to predeterminedplural types of reference printing media; measuring spectral intensityas light intensity at predetermined plural types of measurementwavelengths by applying light to a printed medium before an image isprinted thereon; storing average spectral intensity obtained bymeasuring the spectral intensity at plural times and obtaining averagevalues of the spectral intensity with respect to each measurementwavelength with respect to the plural types of reference printing media;storing covariance information obtained by measuring the spectralintensity at plural times and obtaining covariances of the spectralintensity among the plural measurement wavelengths with respect to theplural types of reference printing media; acquiring Mahalanobisdistances between the printed medium and the plural types of referenceprinting media based on the spectral intensity, the average spectralintensity, and the covariance information; determining a type of theprinted medium from the plural reference printing media based on theMahalanobis distances; and performing the image processing stored inresponse to the determined reference printing medium on the image dataand printing the image on the printed medium.